const server = require("../../myconfig.js").config.serverApi;

function requestCardList(){
  return new Promise((resolve,reject)=>{
    wx.request({
      url:server+"select/all/card",
      method:"POST",
      success:function(res){
        console.log("发送请求会员卡列表的请求成功,得到数据如下",res.data)
        resolve(res.data.cards)
      },
      fail:(err)=>{
        console.log("请求会员卡列表失败",err)
        reject(err)
      }
    })
  })
}
module.exports={
  requestCardList:requestCardList
}